package org.imaginedays.java.design.patter.strategy;

public class CashContextNew {
	
	private CashSuper cs = null;

	public CashContextNew(CashType type) {
		
		switch (type) {
		case cashNormal:
			cs = new CashNormal();
			break;
		case cashRebate:
			cs = new CashRebate("0.8");
			break;
		case cashReturn:
			cs = new CashReturn("300", "100");
			break;

		}
	}
	
	
	public double getResult(double money){
		return cs.acceptCash(money);
	}
	

}
